﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Atentis_Connector
{
	/// <summary>
	/// Класс настроек стратегий
	/// </summary>
	public class StrategySettings
	{
		private decimal m_TakeProfit;
		/// <summary>
		/// Число - задает тэйк.
		/// </summary>
		public decimal TakeProfit { get { return m_TakeProfit; } set { m_TakeProfit = value; } }

		private int m_Period;
		/// <summary>
		/// Число - задает период для постоения свечей.
		/// </summary>
		public int Period { get { return m_Period; } set { m_Period = value; } }

		private int m_Vol;
		/// <summary>
		/// Число - задает пороговый объем.
		/// </summary>
		public int Vol { get { return m_Vol; } set { m_Vol = value; } }

		private int m_MinCandleSize;
		/// <summary>
		/// Число - задает минимальный размер свечи.
		/// </summary>
		public int MinCandleSize { get { return m_MinCandleSize; } set { m_MinCandleSize = value; } }

		private decimal m_Threshold;
		/// <summary>
		/// Число - задает порог пробития.
		/// </summary>
		public decimal Threshold { get { return m_Threshold; } set { m_Threshold = value; } }

		private decimal m_StopLoss;
		/// <summary>
		/// Число - задает стоп-лосс.
		/// </summary>
		public decimal StopLoss { get { return m_StopLoss; } set { m_StopLoss = value; } }

		private bool m_UseAO;
		/// <summary>
		/// Учитывать сигналы awesome oscillator
		/// </summary>
		public bool UseAO { get { return m_UseAO; } set { m_UseAO = value; } }

		private bool m_UseFraqPosition;
		/// <summary>
		/// Учитывать ли положение фрактала
		/// </summary>
		public bool UseFraqPosition { get { return m_UseFraqPosition; } set { m_UseFraqPosition = value; } }

		public StrategySettings(int vol, int minCandle, decimal take, int period, decimal threshold, decimal stoploss, bool useAO, bool useFraqPos)
		{
			this.m_TakeProfit = take;
			this.m_Period = period;
			this.m_Threshold = threshold;
			this.m_StopLoss = stoploss;
			this.m_Vol = vol;
			this.m_MinCandleSize = minCandle;
			this.m_UseAO = useAO;
			this.m_UseFraqPosition = useFraqPos;
		}

		public StrategySettings()
		{
			this.TakeProfit = 0;
			this.m_Period = 0;
			this.m_Threshold = 0;
			this.m_StopLoss = 0;
			this.m_Vol = 0;
			this.m_MinCandleSize = 0;
			this.m_UseAO = false;
			this.m_UseFraqPosition = false;
		}
	}
}
